<?php
/**
 * 发邮件
 * @author justup@qq.com
 */
class T_mail extends phpmailer{
	
	public function __construct($array=array()){
		$this->exceptions = empty($array['exception']);
		$this->_defaultConfig();
		foreach($array as $key => $value){
			$this->$key = $value;
		}
	}
	
	/*
	 * 系统默认邮件配置
	 */
	private function _defaultConfig(){
		$this->CharSet = 'utf-8';	//设置中文编码
		foreach(C('MAIL:MAIL') as $key=>$value){
			$this->$key = $value;
		}
	}
}